home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / RAND / UNSPLIT / text0336.txt < prev    next >
Encoding:
Text File  |  1997-02-06  |  533 b   |  23 lines

  1. hi
  2.  
  3. just a quicky... one of the functions that the DEU source code takes a string,
  4. and some parameters in the same way as printf (but with an extra one at the
  5. beginning). I want to take these parameters, and combine them into a single
  6. string (using sprintf) but I dont have any idea how to do this...
  7.  
  8. Q: is this valid? or how else can I do it?
  9.  
  10. void ProgError(int x, char *pattern, ...)
  11. {
  12.  char temp[100];
  13.  
  14.  sprintf(temp,pattern,...);
  15.  
  16. }
  17.  
  18. Do you see what I'm trying to do? Will I have to effectively write sprintf
  19. myself?
  20.  
  21. Anthony
  22.  
  23.